.joe {
  &_journal_add {
    position: absolute;
    top: 14px;
    right: 14px;
    cursor: pointer;
    font-size: 16px;
    color: var(--main);

    &:hover {
      color: var(--theme);
    }

    i {
      font-size: 20px;
    }
  }

  &_journals__list {
    padding: 10px 0 20px;

    &.hidden {
      visibility: hidden;
    }

    &.effect {
      &_journal {
        &__item {
          visibility: hidden;
        }
      }
    }
  }

  &_journal {
    &__item {
      position: relative;
      padding: 0 0 30px 40px;

      &:before {
        position: absolute;
        left: 12px;
        top: 0;
        z-index: 0;
        content: "";
        width: 0;
        height: 150%;
        border-left: 1px dashed var(--classG);
      }

      &:hover {
        .joe_journal_block {
          box-shadow: 3px 8px 15px 0 var(--box-shadow-journal);
        }
      }
    }

    &_date {
      position: relative;
      left: -36px;
      z-index: 1;
      height: 34px;
      line-height: 34px;
      font-size: 14px;
      color: var(--routine);
      background: var(--background);

      i {
        margin-right: 8px;
      }

      em {
        font-style: normal;
      }
    }

    &_block {
      position: relative;
      z-index: 2;
      box-sizing: border-box;
      padding: 10px;
      margin-top: 10px;
      word-break: break-word;
      color: var(--main);
      background: var(--background-journal);
      border-bottom: 1px solid var(--classC);
      border-radius: 0 18px 18px 18px;
      border: 1px solid var(--classC);
      box-shadow: 1px 1px 5px 0 var(--box-shadow-journal);
      transition: box-shadow 0.2s;
    }

    &_body {
      position: relative;
      max-height: 300px;
      overflow: hidden;
      padding: 10px 12px;
      background: var(--background-journal-block);
      border-radius: 0 6px 6px 6px;
      transition: height 0.2s;

      &.open {
        max-height: unset !important;

        .journal_content_expander {
          background: none;

          i {
            transform: rotate(180deg);
          }
        }
      }

      .content-wrp {

        h1,
        h2,
        h3,
        h4,
        h5,
        h6 {
          color: var(--main);
          line-height: 24px;
          margin-bottom: 18px;
          position: relative;
        }

        h1 {
          margin: 30px 0 20px 0;

          &::before {
            position: relative;
            display: inline-block;
            vertical-align: middle;
            content: "¶";
            top: -4px;
            margin-right: 12px;
            font-size: 24px;
            color: var(--theme);
          }
        }

        h2 {
          margin: 20px 0 20px 0;
          font-size: 1.4em;

          &::before {
            position: relative;
            display: inline-block;
            vertical-align: middle;
            content: "";
            top: -2px;
            left: 0;
            width: 20px;
            height: 20px;
            margin-right: 6px;
            background-position: center;
            background-repeat: none;
            background-size: auto 100%;
            background-image: url("");
          }
        }

        h3 {
          margin: 20px 0 16px 0;
          font-size: 1.3em;

          &::before {
            position: relative;
            display: inline-block;
            vertical-align: middle;
            content: "";
            top: -3px;
            left: 0;
            width: 20px;
            height: 20px;
            margin-right: 8px;
            background-position: center;
            background-repeat: none;
            background-size: auto 100%;
            background-image: url("");
          }
        }

        h4 {
          font-size: 1.18em;

          &::before {
            position: relative;
            display: inline-block;
            vertical-align: middle;
            content: "";
            top: -2px;
            width: 22px;
            height: 22px;
            margin-right: 6px;
            color: var(--theme);
            background-position: center;
            background-repeat: none;
            background-size: auto 100%;
            background-image: url("");

          }
        }

        h5 {
          font-size: 1em;

          &::before {
            position: relative;
            display: inline-block;
            vertical-align: middle;
            content: "";
            top: -1px;
            left: 0;
            width: 18px;
            height: 18px;
            margin-right: 6px;
            background-position: center;
            background-repeat: none;
            background-size: 100% 100%;
            background-image: url("");
          }
        }

        h6 {
          font-size: 1em;

          &::before {
            position: relative;
            display: inline-block;
            vertical-align: middle;
            content: "";
            top: -1px;
            left: 0;
            width: 16px;
            height: 16px;
            margin-right: 6px;
            background-position: center;
            background-repeat: none;
            background-size: auto 100%;
            background-image: url("");
          }
        }

        a:not([class]) {
          display: inline-block;
          line-height: 26px;
          text-indent: 0;
          color: var(--theme);
          position: relative;

          &:hover::after {
            opacity: 1;
            transform: scaleX(1);
          }

          &::after {
            position: absolute;
            bottom: -1px;
            left: 0;
            content: "";
            width: 100%;
            height: 1px;
            background: var(--theme);
            transform: scaleX(0.25);
            opacity: 0;
            transition: transform 0.35s, opacity 0.35s;
          }
        }

        hr {
          border: none;
          height: 1px;
          background-color: var(--classB);
          margin-bottom: 18px;
        }

        p {
          line-height: 26px;
        }

        blockquote {
          line-height: 26px;
          margin: 10px 0;
          padding: 8px 15px;
          color: var(--routine);
          background: var(--classD);
          border-left: 5px solid var(--quote);
          border-radius: var(--radius-inner);

          p {
            margin: 0;
          }
        }

        ol,
        ul {
          margin-bottom: 18px;
          padding-left: 36px;

          li {
            line-height: 26px;

            &.task-list-item {
              margin-left: -16px;
              list-style: none;

              input {
                position: relative;
                top: 1px;
              }
            }
          }
        }

        ol li {
          list-style: decimal;
        }

        ul li {
          list-style: disc;
        }

        img {
          display: inline-block;
          max-width: var(--img-max-width) !important;
          cursor: zoom-in;
          margin: 5px 0;
          border-radius: var(--radius-img);
          transition: transform 0.35s, box-shadow 0.35s;

          &:hover {
            transform: translateY(-3px);
            box-shadow: 0 34px 20px -24px rgba(136, 161, 206, 0.3);
          }
        }

        table {
          width: 100%;
          max-width: 100%;
          table-layout: fixed;
          border-collapse: unset;
          color: var(--routine);
          margin-bottom: 18px;
          overflow: hidden;
          font-size: 13px;
          border: 1px solid var(--classE);
          border-radius: 4px;

          td,
          th {
            padding: 8px;
            border-right: 1px solid var(--classE);
            border-bottom: 1px solid var(--classE);
          }

          thead {
            th {
              font-weight: 500;
              background: var(--classC);

              &:last-child {
                border-right: none;
              }
            }
          }

          tbody {
            tr {
              transition: background 0.35s;

              &:last-child td {
                border-bottom: none;
              }

              &:hover {
                background: var(--classD);
              }

              td:last-child {
                border-right: none;
              }
            }
          }
        }

        video {
          max-width: 100% !important;
        }

        .code-toolbar {
          margin: 10px 0;
        }

        .owo_image {
          max-height: 26px;
          vertical-align: top;
        }
      }
    }

    &_footer {
      padding: 12px 0 2px;

      .footer-wrap.open {
        .joe_journal_comment {
          display: block;
          padding-top: 18px;
        }

        .journal_comment_expander i {
          vertical-align: text-bottom;
          transform: rotate(180deg);
        }
      }
    }

    &_operate_item {
      margin-right: 8px;
      font-size: 0;
      user-select: none;
      color: var(--routine);
      transition: color 0.2s;

      i {
        display: inline-block;
        cursor: pointer;
        margin-right: 4px;
        vertical-align: sup;
        transition: all 0.2s;
      }

      em {
        font-size: 14px;
        font-style: normal;
        font-family: var(--font-default);
      }

      &.like,
      &.comment {
        margin-left: 10px;
        margin-right: 0;

        i:hover {
          transform: scale(1.1);
          color: var(--classF);
        }
      }

      .journal-unlike {
        cursor: default;
        display: none;
        color: #f15c43;

        &:hover {
          transform: scale(1);
          color: #f15c43 !important;
        }
      }

      &.journal_comment_expander {
        cursor: pointer;
        display: flex;
        align-items: center;
        float: right;
        margin-right: 0;

        &:hover {
          color: var(--classF);
        }
      }

      &.journal_content_expander {
        pointer-events: none;
        display: none;
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        margin-right: 0;
        padding-top: 10px;
        text-align: right;
        background: var(--background-journal-gradient);

        i {
          pointer-events: auto;
          font-size: 20px;
        }
      }
    }

    &_comment {
      display: none;
    }
  }
}

.joe_pagination {
  padding: 0 0 20px 0;
}

.page-journals {
  .joe_detail {
    position: relative;
    overflow-y: hidden;
  }
}